package com.csoa.community.requests;

import java.util.List;

import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;

import android.util.Log;

import com.csoa.community.bean.OffDocDetailBean;
import com.csoa.community.net.ErrorMsg;
import com.csoa.community.utils.Json;
import com.csoa.community.utils.StringUtils;

public class OffDocDetailRequest extends AbstractRequest {

	public OffDocDetailBean offDocDetailBean;
	
	public OffDocDetailRequest(List<BasicNameValuePair> requestValues) {
		super(OFFICIAL_DOC_DETAIL_METHOD, requestValues);
	}

	

	@Override
	protected void parseRemaingInfo(String json) throws ErrorMsg, JSONException {
		if(!StringUtils.isEmpty(json)) {
			Log.i("msg", json);
			String stadard = json.replace("[", "").replace("]", "");
			Json detailJson = new Json(stadard);
			offDocDetailBean = new OffDocDetailBean();
			offDocDetailBean.DisName = detailJson.getString("DisName");
			offDocDetailBean.TypeName = detailJson.getString("TypeName");
			offDocDetailBean.Title = detailJson.getString("Title");
			offDocDetailBean.ReceiveCode = detailJson.getString("ReceiveCode");
			offDocDetailBean.Code = detailJson.getString("Code");
			offDocDetailBean.CreateDate = detailJson.getString("CreateDate");
			offDocDetailBean.ImportGrade = detailJson.getString("ImportGrade");
			offDocDetailBean.FromDept = detailJson.getString("FromDept");
			offDocDetailBean.Memo = detailJson.getString("Memo");
			offDocDetailBean.StartTime = detailJson.getString("StartTime");
			offDocDetailBean.EndTime = detailJson.getString("EndTime");
			offDocDetailBean.Important = detailJson.getString("Important");
			offDocDetailBean.Address = detailJson.getString("Address");
			
		}
		
	}
	
	
	
}
